<template>
  <div class="home">
    <van-swipe class="my-swipe" :autoplay="2000" indicator-color="white">
      <van-swipe-item>1</van-swipe-item>
      <van-swipe-item>2</van-swipe-item>
      <van-swipe-item>3</van-swipe-item>
      <van-swipe-item>4</van-swipe-item>
    </van-swipe>
  </div>
</template>

<script>
// @ is an alias to /src
import HelloWorld from '@/components/HelloWorld.vue'
import MinXin from './demo.js'
export default {
  name: 'Home',
   mixins: [MinXin],
  data() {
    return {
      name: '测试'
    }
  },
  components: {
    HelloWorld
  },
  methods:{
    open() {
      console.log('这是home');
    }
  },
  mounted() {
    console.log(this);
    this.open();
  },
  beforeCreate() {
    // console.log('home   创建之前');
  },
}
</script>
<style >
.home{
  width: 700px;
  margin: 0 auto;
}
   .my-swipe .van-swipe-item {
    color: #fff;
    font-size: 20px;
    line-height: 150px;
    text-align: center;
    background-color: #39a9ed;
  }
</style>
